package com.common.core;

/**
 * Created with IntelliJ IDEA.
 * Description:网易云音乐常量
 * Author : wangyu
 * Date: 2018-03-05
 * Time: 16:01
 */
//TODO 以后再这里写网易云音乐爬虫总结
    //TODO 写一个agent代理池,反爬虫
    //TODO 写一个IP池.进行代理
public interface WyyMusicConstant {
    int RETRY_TIMES = 3;//失败重试次数

    int THREAD_NUMS = 100;//并行线程数

    /** 评论大小 **/
    int CMT_LIMIT = 20;//每次ajax分页查询的评论数
    /** 歌曲 **/
    String SONG = "SONG";
    /** 歌单 **/
    String SONG_MENU = "SONG_MENU";

    String START_DISCOVER_URL = "http://music.163.com/discover/playlist";
    String START_PLAYLIST_URL = "http://music.163.com/playlist?id=2122104724";
    // 主域名 2122104724
    String BASE_URL = "http://music.163.com/";
    // 歌单URL
    String PLAYLIST_URL = "http://music\\.163\\.com/playlist\\?id=\\d+";
    //匹配歌单分类URL
    String DISCOVER_URL = "http://music\\.163\\.com/discover/playlist/\\?cat=.+";
    // 匹配歌曲URL
    String SONG_URL = "http://music\\.163\\.com/song\\?id=\\d+";
    //用户信息
    String MUSIC_USER_URL = "http://music\\.163\\.com/user/home\\?id=\\d+";

    String[] agents = {"Mozilla/5.0(compatible;MSIE9.0;WindowsNT6.1;Trident/5.0",
    "Mozilla/5.0(Windows;U;WindowsNT6.1;en-us)AppleWebKit/534.50(KHTML,likeGecko)Version/5.1Safari/534.50",
    "Mozilla/5.0(Macintosh;IntelMacOSX10.6;rv:2.0.1)Gecko/20100101Firefox/4.0.1",
    "Mozilla/5.0(WindowsNT6.1;rv:2.0.1)Gecko/20100101Firefox/4.0.1",
    "Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.1;TencentTraveler4.0)",
    "Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.1)",
    "Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.1;Trident/4.0;SE2.XMetaSr1.0;SE2.XMetaSr1.0;.NETCLR2.0.50727;SE2.XMetaSr1.0)",
    "Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.1;360SE)",
    "Mozilla/5.0(Macintosh;IntelMacOSX10_7_0)AppleWebKit/535.11(KHTML,likeGecko)Chrome/17.0.963.56Safari/535.11"};

    String[] ips = {
            "59.44.164.34:3128",
            "183.232.188.33:80"
    };
}
